{block admin_content}
<h1>Úkoly</h1>
<table width="100%">
	<thead>
		<tr><th>Projekt</th><th>Realizátor</th><th>Název</th><th>Deadline</th><th width="20">Veřejný</th><th width="20"><a n:href="addTaskSelectProject">Přidat</a></th></tr>
	</thead>
	<tbody>
		{foreach $tasks as $task}
		<tr>
			<td>{$task->project[name]}</td>
			<td>{$task->worker[name]|truncate:2:'.'} {$task->worker[surname]}</td>
			<td>{$task[name]}</td>
			<td>{$task[deadline]|date:$dateFormatLong}</td>
			<td class="center">{$task['public']|bool2image}</td>
			<td class="center"><a n:href="editTask, $task[id]"><img src="{$basePath}/images/edit.gif"></a> <a n:href="deleteTask!, $task[id]" onclick="return del();"><img src="{$basePath}/images/delete.gif"></a></td>
		</tr>
		{/foreach}
	</tbody>
</table>
<script type="text/javascript">
function del(){
	return confirm('Opravdu chcete smazat úkol?');
}
</script>
{/block}